#ifndef __C_GUI_ICON_SLOT_H_INCLUDED__
#define __C_GUI_ICON_SLOT_H_INCLUDED__

#include "IGUIElement.h"

namespace irr
{
namespace gui
{

//! A slot to put icons in
class CGUIIconSlot : public IGUIElement
{
public:

	//! Constructor
	CGUIIconSlot(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle, s32 slotGroup);

	//! Destructor
	~CGUIIconSlot();

	virtual bool OnEvent(SEvent e);

	//! draws the element and its children
	virtual void draw();

	//! override the add method, so we can decide if the slot is full
	virtual void addChild(IGUIElement *child);

	//! override the remove method, so we can decide if the slot is empty
	virtual void removeChild(IGUIElement *child);

	//! Sets an image which should be displayed as the slot
	void setImage(video::ITexture *img);

	//! Sets the slot group ID, icons may only be dragged between slots with the same group ID
	void setSlotGroupID(s32 ID);

	//! Gets the slot's group ID, used to see if other slots are compatible with this one
	s32 getSlotGroupID();

private:

	//! Texture for the slot
	video::ITexture* Texture;

	//! Group ID of the slot
	s32 SlotGroupID;

	//! Is the slot currently highlighted (dragged over)
	bool Highlight;

	//! Is an slot already filled by an icon?
	bool Full;
};

}//end namespace gui
}//end namespace irr
#endif
